#define _CRT_SEUCRE_NO_WARININGS 1
#include<stdio.h>

 typedef struct ListNode
{
	int data;
	struct ListNode* pr;
}Node;

int main()
{  
	Node a = { {1},{NULL} };
	Node b = { {2},{NULL} };
	Node c = { {3},{NULL} };
	a.pr = b;
	b.pr = c;
	Node A = { {1},{NULL} };
	Node B = { {2},{NULL} };
	Node C = { {3},{NULL} };
	A.pr = B;
	B.pr = C;
	Node* p1=NULL;
	Node* p2=NULL;
	p1 = a;
	p2 = b;
	while (p1)
	{ 
		if (p1->data + p2->data >= 10)
		{
			p1->pr->data++;
			p1->data = (p1.data + p2.data) / 10;

		}
		p1++;
		p2++;
	}


	return 0;

}